package com.example.chirdrenserver.Pojo.dto.admin;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import javax.validation.constraints.*;
@Data
public class AdminCreateUserDTO {
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;

    @NotBlank(message = "昵称不能为空")
    @Size(min = 2, max = 20, message = "昵称长度必须在2-20个字符之间")
    private String nickname;

    @NotBlank(message = "密码不能为空")
    @Pattern(
            regexp = "^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{8,20}$",
            message = "密码必须包含字母和数字，长度在8-20之间"
    )
    private String password;

    private String avatar;
    private String description;
    private Boolean sex; // true:男, false:女
}
